﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript" th:src="@{/home/js/public.js}"></script>
</head>
	<body>
		<div class="navigation-t">
	   	  <div class="navigation-tl">当前位置：<a href="#" onclick="changeMain('home')">主页</a></div>
	    </div>
	    <div class="project">
	      <div class="project-padding"> 
	          <div class="table-tool">
	          	 <div class="table-tool-title"><span>浏览进度</span></div>
	          </div>
	          <div class="table-head">
	          	<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
	          		<thead>
		          		<tr >
		          			<td width="40%">浏览章节</td>
		          			<td width="60%">时间</td>
		          		</tr>
	          		</thead>
	          		<tbody>
		             	<tr th:attr="dmId=*{dmodelId},projectId=*{projectId}" th:object="${commentTags}"   onclick="dw(this)" th:each="commentTags,iterStat : ${CommentTags}" >
							<td th:text="${commentTags.title}">描述</td>
							<td th:text="${commentTags.publishDate}">节点</td>
						</tr>
	          		</tbody>
	          	</table>
	          </div>
	          <div class="table-height"></div>
	          <div class="table-tool">
	          	 <div class="table-tool-title"><span>我的计划</span></div>
	          </div>
	          <div class="table-head">
	          	<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"     >
	          		<thead>
		          		<tr>
		          			<td width="40%">任务描述</td>
		          			<td width="19%">计划节点</td>
		          			<td width="11%">计划类别</td>
		          			<td width="18%">任务状态</td>
		          			<td width="12%">责任人</td>
		          		</tr>
	          		</thead>
	          		<tbody>
		          		<tr th:each="planManage,iterStat : ${PlanManages}"  th:onclick="'javascript:wplan(\''+${planManage.id}+'\',\''+${planManage.taskState}+'\');'" >
							<td th:text="${planManage.taskDescription}">描述</td>
							<td th:text="${planManage.planNode}">节点</td>
							<td th:text="${planManage.palnTypeName}">类别</td>
							<td th:text="${planManage.taskState}">状态</td>
							<td th:text="${planManage.userName}">admin</td>
						</tr>
		          	
	          		</tbody>
	          	</table>
	          </div>
	      </div>
	    </div>
	</body>
	
	
	<script th:inline="javascript">  
/*<![CDATA[*/  
	    	function wplan(id,state){
	       if(state!="完成"){
	    	   $.Zebra_Dialog('<div class="prompt"><div class="warning-icon"></div><div class="success-title">该任务是否已经完成!</div></div>', {
		            'title':'我的任务',
		            'buttons':[{caption: '确定', callback: function() { 
		           		    var obj ={id:id};
		       		         AjaxWebTableInfo("/home/myPlanState",obj);
		                     }},'取消']
		        });
	       }else{
	    	   
	   		$.Zebra_Dialog('<div class="prompt"><div class="warning-icon"></div><div class="success-title">任务已完成!</div></div>', {
	            'title':'我的任务',
	            'buttons':['确定']
	        });
	       }
	    		
	    	}
	    	function AjaxWebTableInfo(url , obj){
	   		 $.ajax({
	   		     type: "post",
	   		     dataType: "json",
	   		     url: url,
	   		     data:obj,
	   		     success: function (data, status) {
	   		     $("#frameReft").load("/home/all");
	   		     },
	   		     error: function (data) {
	   	  		     $("#frameReft").load("/home/all");
	   		     }
	   		 });	
	   	}
	    	function dw(p){
	    		top.dmIds=$(p).attr('dmId');
	    		var url=window.location.href; 
	    		if(url.indexOf('ietm')>-1){
	    			changeMain('ietm-home');
	    			window.parent.clickDw($(p).attr('dmId'));
	    		}else{
	    			window.location.href="ietm/index?ietm="+$(p).attr('dmId')+"&projectId="+$(p).attr('projectId');
	    		}
	    		

	    		
	    	}
/*]]>*/  
</script>
</html>

